function showResult(str) {
    var xmlhttp = new XMLHttpRequest();
    xmlhttp.onreadystatechange = function () {
        if (this.readyState == 4 && this.status == 200) {
            var result = JSON.parse(this.responseText);

            $(".exercise").removeClass("d-inline");
            $(".exercise").addClass("d-none");

            for (var i = 0; i < result.length; i++) {
                $("#" + result[i]).removeClass("d-none");
                $("#" + result[i]).addClass("d-inline");

            }
            // document.getElementById("txtHint").innerHTML=this.responseText;
            // document.getElementById("txtHint").style.border="1px solid #A5ACB2";
        }
    }
    xmlhttp.open("GET", "livesearch.php?q=" + str, true);
    xmlhttp.send();

}